package com.sjhang.controller;


import com.sjhang.entity.TbVideo;
import com.sjhang.service.TbVideoService;
import com.sjhang.utils.ListParamVo;
import com.sjhang.utils.ResultResponse;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 教学视频
 */
@Api(tags = {"视频接口"})
@RestController
@RequestMapping("/tbVideo")
public class TbVideoController {

    @Resource
    private TbVideoService tbVideoService;


    /**
     * @description 查询视频
     */
    @PostMapping("/selectVideo")
    public ResultResponse selectVideo(@RequestBody ListParamVo listParamVo){
        return tbVideoService.selectVideo(listParamVo);
    }

    /***
     * @description 新增视频
     */
    @PostMapping("/insertVideo")
    public ResultResponse insertVideo(TbVideo tbVideo){
        return tbVideoService.insertVideo(tbVideo);
    }

    /***
     * @description 修改视频信息，
     */
    @PostMapping("/updateVideo")
    public ResultResponse updateVideo(TbVideo tbVideo){
        return tbVideoService.updateVideo(tbVideo);
    }


    /***
     * @description 删除视频信息
     */
    @PostMapping("/deleteVideo")
    public ResultResponse deleteVideo(Long tbVidel){
        return tbVideoService.deleteVideo(tbVidel);
    }


}

